import request from '@/js/request';

export default {
	// 提交留言咨询
	messageSubmit: (data) => request({
		method: 'POST',
		url: '/api/dev_message/submit',
		data
	}, {
		loading: '提交中...',
		isToast: true
	}),
	// 留言咨询记录
	queryMyMsg: (data) => request({
		method: 'GET',
		url: '/api/dev_message/my',
		data
	}),
	// 留言咨询详情
	queryMyMsgDetail: (data) => request({
		method: 'GET',
		url: '/api/dev_message/detail',
		data
	}),
	// 评论列表
	queryMsgReply: (data) => request({
		method: 'GET',
		url: '/api/dev_message/reply',
		data
	}),
	// 推荐列表
	queryMsgRecommend: (data) => request({
		method: 'POST',
		url: '/api/dev_message/recommend',
		data
	}),
	// 最新列表
	queryMsgLatest: (data) => request({
		method: 'POST',
		url: '/api/dev_message/latest',
		data
	}),
	// 点赞评论或取消点赞
	queryMsgLikes: (data) => request({
		method: 'POST',
		url: '/api/dev_message/likes',
		data
	}, {
		loading: '加载中...',
	})
}